/**
 * 表单验证格式
 * **
 */
// 邮箱验证格式
export const Email_rules = [
    {
        required: true
    },
    {
        validator: (rule, value) => {
            if (/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(value)) {
                return Promise.resolve();
            }
            return Promise.reject(new Error('邮箱格式错误!'));
        }
    }
]
// 默认验证格式
export const Common_rules = [
    {
        required: true
    },
]

export const Image_rules = [
    {
        required: true,
        message: '请上传图片'
    },
]
